<?php

namespace App\Grpc;

use Grpc\LoggerRequest;
use Grpc\LoggerResponse;
use Hyperf\GrpcClient\BaseClient;

class LogClient extends BaseClient
{
    public function __construct()
    {
        $hostname = 'log-srv:9524';
        $options = [
            'credentials' => null,
        ];
        parent::__construct($hostname, $options);
    }

    public function debug(LoggerRequest $request) :LoggerResponse
    {
         return $this->_simpleRequest("/log.Log/Debug",$request,[LoggerResponse::class,"decode"])[0];
    }
}